
package cn.stylefeng.guns.config.beetl;

import cn.stylefeng.guns.constants.LpinfoConstants;
import cn.stylefeng.guns.core.beetl.ShiroExt;
import cn.stylefeng.roses.core.util.ToolUtil;
import org.beetl.ext.spring.BeetlGroupUtilConfiguration;

import java.util.HashMap;
import java.util.Map;


public class BeetlConfiguration extends BeetlGroupUtilConfiguration {

    @Override
    public void initOther() {
        //全局共享变量
        Map<String, Object> shared = new HashMap<>();
        shared.put("SYSTEM_NAME", LpinfoConstants.SYSTEM_NAME);
        shared.put("SYSTEM_COPYRIGHT", LpinfoConstants.SYSTEM_COPYRIGHT);
        groupTemplate.setSharedVars(shared);
        //全局共享方法
        groupTemplate.registerFunctionPackage("shiro", new ShiroExt());
        groupTemplate.registerFunctionPackage("tool", new ToolUtil());
    }
}
